< previous page page_272 next page >

Page 272
Table 12.3 Color Properties of the MonthView
NameDescription
ForeColorControls the color of the days of the month and the horizontal line beneath the week labels.
TrailingForeColorDetermines the color of the days that are outside the months currently being displayed but still visible on the screen. Trailing days on a normal calendar often appear as empty space at the end of the month.
MonthBackColorControls the background area behind the days of the month, but not including the title.
TitleBackColorControls the color of the area behind the month name.
TitleForeColorSets the color of the text used to display the month name.

Displaying Multiple Months
If you want to display more than one month at a time using the MonthView control, you can set the MonthRows and MonthCols properties. For example, Figure 12.22 shows a MonthView control with both of these properties set to a value of 2, creating a grid.
0272-01.jpg
Figure 12.22
The MonthView control is not limited
to displaying a single month at a time.
CAUTION
You cannot display more than 12 months on the screen at one time. Attempting to do so causes an error.

For even more flexibility, you can set the MonthRows and MonthCols properties at runtime, allowing the users to choose dynamically how much of the calendar they want to view. Note that the size of the MonthView control is not user scalable. In other words, the 2×2 grid shown in Figure 12.22 always has a fixed size. If you change the size of the grid at runtime, the MonthView control automatically expands and contracts to the new size. Therefore, knowing the new size beforehand would be nice. Fortunately, the MonthView control offers a method

 
< previous page page_272 next page >